local skynet = require "skynet"

function task(timeout)
    skynet.error("fork co:", coroutine.running())
    skynet.error("begin fork")
    skynet.sleep(timeout)
    
    skynet.error("end fork")
end

skynet.start(function ()
    skynet.error("start co:", coroutine.running())
    skynet.fork(task, 500)  --开启一个新的线程来执行task任务
end)